import React from 'react';
import { InputNumber } from 'antd';

interface SerialTimeOutViewProps {
  value?: number;
  onChange?: (value: number | null) => void;
}

const SerialTimeOutView: React.FC<SerialTimeOutViewProps> = ({
  value,
  onChange,
}) => (
  <InputNumber
    min={1}
    max={1000}
    step={1}
    placeholder="超时时间（ms）"
    value={value}
    onChange={onChange}
    style={{ width: '100%' }}
    inputMode="numeric"
  />
);

export default SerialTimeOutView;
